package org.uoss.webapp.framework.context;

import javax.servlet.ServletContext;

import org.uoss.applications.framework.context.ApplicationBeansContext;

public final class WebappBeansContext extends ApplicationBeansContext {
	
	private static WebappBeansContext contextInstance = null;
	private ServletContext servletContext;

	public static WebappBeansContext getContextInstance(){
		if(contextInstance==null){
			contextInstance = new WebappBeansContext();
			contextInstance.setAppConfigInstance(new WebappSystemConfiguration());
		}
		return contextInstance;
	}
	
	public void destroy(){
		contextInstance = null;
	}

	public void setServletContext(ServletContext servletContext) {
		this.servletContext = servletContext;
	}

	public ServletContext getServletContext() {
		return servletContext;
	}
}
